%ul#orders
  - @shop_customer.orders.each do |order|
    %li.order
      %h3
        = link_to number_to_currency(order.price), edit_admin_shop_order_path(order)
        = distance_of_time_in_words Time.now, order.updated_at
        ago
      %h4
        = order.line_items.count
        = order.line_items.count == 1 ? 'item' : 'items'
        = "(#{order.status})"
      
      %br
      
      - if order.billing.present?
        %h4 Billing
        %span.billing= render :partial => '/admin/shop/customers/edit/parts/address', :locals => { :address => order.billing }
      
        %h4 Shipping
        %span.shipping= render :partial => '/admin/shop/customers/edit/parts/address', :locals => { :address => order.shipping }
      - else
        %h4 No Addresses
        The customer hasn't assigned any addresses to this order yet
        
      %h4 Payment
      %span.payment
        - if order.paid?
          = order.payment.card_number
          = order.payment.card_type
        - else
          This order hasn't been paid for yet
      
      %hr